"use strict";
//计算一致字符串
const allowed = 'ab';
const words = ["ad", "bd", "aab", "baa", "badab"];
function findStr(allowed, words) {
    let count = 0;
    for (let i = 0; i < words.length; i++) {
        let arr = words[i].split('');
        let flag = arr.every((item) => {
            return allowed.includes(item);
        });
        if (flag) {
            count++;
        }
    }
    return count;
}
console.log(findStr(allowed, words));
